package com.pingan.haofang.searchcloud.index.constants;

/**
 * 索引构建相关常量
 *
 * @author zhangbi617
 * @date 17/5/8
 * @since 1.0.0
 */
public interface IndexBuildConstants {

    /**
     * 不支持该构建方式
     */
     long INDEX_BUILD_ID_NOT_SUPPORT = 0;

     String LOCK = "searchcloud_index_build_lock";

    /**
     * 中断
     */
     String INTERRUPT = "searchcloud_index_build_interrupt";

    /**
     * 暂停
     */
    String PAUSE = "searchcloud_index_build_pause";

    String LOCK_TIME = "searchcloud_index_build_lock_time";

    String INC_MERGE_MAX_TIME_REDIS_KEY_SUFFIX = "_inc_merge_max_time";

    String INC_MERGE_REDIS_KEY_SUFFIX = "_inc_merge";


    /**
     * 进度
     */
    String PROGRESS = "searchcloud_index_build_progress";

    /**
     * 构建基准索引暂停
     */
    Long INDEX_BUILD_PAUSE = 1L;

    /**
     * 开启多线支持阈值,最少要2个线程
     */
    int MULTI_THREAD_SUPPORT_THRESHOLD = 2;

    /**
     * 默认线程序号
     */
    Integer DEFAULT_THREAD_SEQ = 0;


    /**
     * 保存progressId 的redisKey前缀
     */
    String SOLR_PROGRESS_ID_PREFIX = "SOLR_PROGRESS_ID_";

    String SCHEDULE_TASK = "SCHEDULE_TASK";

    String COLLECTION_NAME = "COLLECTION_NAME";

    String BEFORE = "BEFORE";

    String RESUME_JOB = "RESUME_JOB";

    String MANUAL_JOB = "MANUAL_JOB";

    String IS_RESUME_JOB = "1";

    String IS_MANUAL_JOB = "1";

    /**
     * 设置redis先关多线程任务key的超时时间
     */
    int EXPIRE_IN_DAYS = 3;

    /**
     * args
     */
    String ARGS = "args";

    /**
     * 记录导入总数的key后缀
     */
    String TOTAL_KEY_SUFFIX = "TOTAL";

    /**
     * 搜索云调用数据源传入的header名称
     */
    String HF_SEARCHCLOUD_PROGRESS_ID = "hf-searchcloud-progress-id";


    String INDEX_INC_KEY_HOLDER= "searchcloud_index_inc_key_holder";

    String INDEX_INC_KEY_PERFIX= "searchcloud_index_inc";

    String INC_QUERY_PARAM_VERSION_FROM = "versionFrom";
    String INC_QUERY_PARAM_VERSION_TO = "versionTo";
    /**
     * 定时增量的分页大小
     */
    long INC_DEFAULT_PAGE_SIZE = 1000;


}
